# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Donald Carr <sirspudd@gmail.com>
# Contributor: Jake Petroules <jake.petroules@qt.io>

pkgname=qbs
pkgver=1.12.1
pkgrel=1
pkgdesc='Cross platform build tool'
arch=(x86_64)
url='https://wiki.qt.io/Qbs'
license=(LGPL)
depends=(qt5-script)
source=(http://download.qt.io/official_releases/qbs/${pkgver}/qbs-src-${pkgver}.tar.gz)
sha256sums=('8869177e6147ace5fcd40720ea81b10345e87f6556a17332521b9ff5b729c999')

build() {
  cd $pkgname-src-$pkgver
  qmake QBS_INSTALL_PREFIX=/usr \
    CONFIG+=qbs_enable_project_file_updates \
    QBS_LIBEXEC_INSTALL_DIR=/usr/lib/qbs \
    QBS_LIBEXEC_DESTDIR=../../../lib/qbs \
    QBS_RELATIVE_LIBEXEC_PATH=../lib/qbs \
    qbs.pro
  make
}

package() {
  cd $pkgname-src-$pkgver
  INSTALL_ROOT="$pkgdir" make install
}
